<?php
namespace Pw\MainBundle\Entity;

use Symfony\Component\Validator\Mapping\ClassMetadata;
use Symfony\Component\Validator\Constraints as Assert;
class Chapter
{
	private $id;
	private $guideId;
	private $title;
	private $rawText;
	private $parsedText;

	private $guide;
	public function __construct() {

	}

	public static function loadValidatorMetadata(ClassMetadata $metadata)
    {
//		$metadata->addConstraint(new UniqueEntity(array('fields' => 'name', 'groups' => array('add'))));
//		$metadata->addPropertyConstraint('icon', new Assert\Image(array(
//			'maxSize' => '1024k',
//			'mimeTypesMessage' => 'Please upload a valid image (1MB max)',
//        )));
//		$metadata->addPropertyConstraint('art', new Assert\Image(array(
//			'maxSize' => '1024k',
//			'mimeTypesMessage' => 'Please upload a valid image (1MB max)',
//        )));
//		//Name
//		$metadata->addPropertyConstraint('name', new Assert\NotBlank());
//        $metadata->addPropertyConstraint('name', new Assert\Length(array("max" => 100)));
	}


    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set guideId
     *
     * @param integer $guideId
     * @return Chapter
     */
    public function setGuideId($guideId)
    {
        $this->guideId = $guideId;
    
        return $this;
    }

    /**
     * Get guideId
     *
     * @return integer 
     */
    public function getGuideId()
    {
        return $this->guideId;
    }

    /**
     * Set title
     *
     * @param string $title
     * @return Chapter
     */
    public function setTitle($title)
    {
        $this->title = $title;
    
        return $this;
    }

    /**
     * Get title
     *
     * @return string 
     */
    public function getTitle()
    {
        return $this->title;
    }

    /**
     * Set rawText
     *
     * @param string $rawText
     * @return Chapter
     */
    public function setRawText($rawText)
    {
        $this->rawText = $rawText;
    
        return $this;
    }

    /**
     * Get rawText
     *
     * @return string 
     */
    public function getRawText()
    {
        return $this->rawText;
    }

    /**
     * Set parsedText
     *
     * @param string $parsedText
     * @return Chapter
     */
    public function setParsedText($parsedText)
    {
        $this->parsedText = $parsedText;
    
        return $this;
    }

    /**
     * Get parsedText
     *
     * @return string 
     */
    public function getParsedText()
    {
        return $this->parsedText;
    }

    /**
     * Set guide
     *
     * @param \Pw\MainBundle\Entity\Guide $guide
     * @return Chapter
     */
    public function setGuide(Guide $guide = null)
    {
        $this->guide = $guide;
    
        return $this;
    }

    /**
     * Get guide
     *
     * @return \Pw\MainBundle\Entity\Guide 
     */
    public function getGuide()
    {
        return $this->guide;
    }
}